import React from 'react';
import PropTypes from 'prop-types';
class Image extends React.Component {
  static defaultProps = {
    style: {},
    InsertPagination: false,
  };
  render() {
    return (
      <div>
        <img
          src={this.props.src}
          width={this.props.width}
          height={this.props.height}
          style={this.props.InsertPagination ? { pageBreakBefore: 'always', ...this.props.style } : { ...this.props.style }}
        />
      </div>
    );
  }
}
Image.propsTypes = {
  src: PropTypes.string,
  height: PropTypes.number,
  width: PropTypes.number,
  style: PropTypes.bool,
  InsertPagination: PropTypes.bool, // 是否插入分页
};
export default Image;
